<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="com.dangdang.dao.*"%>
<%@page import="com.dangdang.domain.*"%>
<%
	BookDao bd = new BookDao();
	List<Category> cate = bd.getCategory();	
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="../css/style.css" type="text/css"
			rel="stylesheet" />
	</head>
	<body topMargin="10">

		<div id="append_parent"></div>
		<table cellSpacing="6" cellPadding="2" width="100%" border="0">
			<tbody>
				<tr>
					<td>
						<table class="guide" cellSpacing="0" cellPadding="0" width="100%"
							border="0">
							<tbody>
								<tr>
									<td>
									&nbsp;
									</td>
								</tr>
							</tbody>
						</table>
						<br />
						<form id="settings" action="list.jsp" method="post">
							<table class="tableborder" cellSpacing="0" cellPadding="0"
								width="100%" border="0">
								<tbody>
									<tr class="header">
										<td colSpan="4">
											按类别查找
										</td>
									</tr>
									<tr>
										<td class="altbg1" width="20%" align="center">
											<div align="center"> 
												<font color="#800000">
													<b>选择类别:</b>
												</font>
											</div>
										</td>
										<td class="altbg2" valign="middle" width="20%">
											<select name="categoryId" >
											<option value='0'>--选择分类--</option>
											<%
												for(Category ca : cate){
											  %>
												<option value='<%=ca.getId()%>'>
													<%
															for (int i = 0; i < ca.getLevel(); i++) {
																out.write("&nbsp;&nbsp;&nbsp;&nbsp;");
															}
													%>
												<%=ca.getName() %></option>
												<%
												}
												 %>
											</select>
										</td>
										<td valign="top"><br></td><td>

											<span style="color: red"> </span>
										<br></td>
									</tr>
								</tbody>	
								<tbody>
									<tr>
										<td class="altbg1" width="20%" align="center"><div align="center"> 
											<font color="#800000"><b>书&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</b></font></div>
										</td>
										<td class="altbg2" valign="middle" width="20%">

											<input type="text" name="name" value='' />
										</td>
										<td valign="top"><br></td><td>

											<span style="color: red"> </span>
										<br></td>
									</tr>
									<tr>
										<td class="altbg1" width="20%" align="center"><div align="center"> 
											<font color="#800000"><b>作&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 者:</b></font></div>
										</td>
										<td class="altbg2">

											<input type="text" name="author" value='' />
										</td>
										<td valign="top"><br></td><td>
											<span style="color: red"> </span>
										<br></td>
									</tr>
									<tr>
										<td class="altbg1" width="20%" align="center"><div align="center"> 
											<font color="#800000"><b>出版社:</b></font></div>
										</td>
										<td class="altbg2">
											<input type="text" name="publisher" value='' />
										</td>

										<td valign="top"><br></td><td>
											<span style="color: red"> </span>
										</td>
									</tr>
								</tbody>
							</table>
							<br />
							<center>
								<input class="button" type="reset" value="重 置"
									name="settingsubmit" />
								<input class="button" type="submit" value="提 交"
									name="settingsubmit" />
							</center>
						</form>
					</td>
				</tr>
			</tbody>
		</table>

	</body>
</html>
